<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function Person(name, age, job) {
      this.name = name;
      this.age = age;
      this.job = job;
      this.sayName = function () { alert(this.name) }
    }
    var person1 = new Person('React', 28, 'Facebook')
    var person2 = new Person('Antd', 23, 'Alibaba')

    console.log(Person.prototype.constructor === Person)
    console.log(Person.prototype.__proto__ === Object.prototype)  // 难点
    console.log(person1.__proto__.constructor === Person)
    console.log(person1.__proto__ === Person.prototype)
    console.log(Object.prototype.__proto__ === null)
    console.log(Person.__proto__ === Function.prototype)
    console.log(Function.prototype.__proto__ === Object.prototype)
    console.log(Object.__proto__ === Function.prototype)
    console.log(Array.__proto__ === Function.prototype)
    console.log(Number.__proto__ === Function.prototype)
    console.log(Function.__proto__ === Function.prototype)
  </script>
</body>

</html>
